From: Florian Eckert Date: Thu, 7 Aug 2025 10:22:24 +0000 (+0200) Subject: modemmanager: always reset the init_eps if not configured X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=246506690f2d625830bdb454ce96b344d2560c14;p=feed%2Fpackages.git modemmanager: always reset the init_eps if not configured The initial EPS is stored on the modem side. When establishing a connection, it must therefore be deleted if no EPS has been configured. This is because the system does not know whether one was configured previously. Signed-off-by: Florian Eckert --- diff --git a/net/modemmanager/files/lib/netifd/proto/modemmanager.sh b/net/modemmanager/files/lib/netifd/proto/modemmanager.sh index 8ed94c5084..f3ee7c8b62 100644 --- a/net/modemmanager/files/lib/netifd/proto/modemmanager.sh +++ b/net/modemmanager/files/lib/netifd/proto/modemmanager.sh @@ -629,13 +629,10 @@ proto_modemmanager_setup() { } # set initial eps bearer settings - [ -z "${init_epsbearer}" ] || { + if [ -z "${init_epsbearer}" ]; then + modemmanager_init_epsbearer "none" "$device" "" "$apn" + else case "$init_epsbearer" in - "none") - connectargs="" - modemmanager_init_epsbearer "none" \ - "$device" "${connectargs}" "$apn" - ;; "default") cliauth="" for auth in $allowedauth; do @@ -667,7 +664,7 @@ proto_modemmanager_setup() { esac # check error for init_epsbearer function call [ "$?" -ne "0" ] && return 1 - } + fi if [ -z "${allowedmode}" ]; then modemmanager_set_allowed_mode "$device" "$interface" "any"